import ElementPlus from 'element-plus'
import 'element-plus/lib/theme-chalk/index.css'

const files = import.meta.glob('./Te*/index.*')

export function setupGlobalComponents (app) {
  for (const path in files) {
    files[path]().then(component => {
      app.component(path.substr(2, path.lastIndexOf('/') - 2), component.default)
    })
  }
  app.use(ElementPlus)
}
